<%-- 
    Document   : price_new
    Created on : Nov 20, 2008, 10:24:14 PM
    Author     : Vyor
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<table>
    <tr>
        <td class="menucon">
            <html:link action="/product_getproducts.do" title="Go to main.">Products</html:link>
        </td>
    </tr>
</table>
<html:messages id="messages" property="customMessage" message="true">
    <div class="heading4"><bean:write name="messages" filter="false"/></div>
</html:messages>
<html:errors/>
<html:messages id="messages" property="message" message="true">
    <ul>
        <li><bean:write name="messages" filter="false"/></li>
    </ul>
</html:messages>
<html:form action="/product_save.do" method="post">
    <table  border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td>Code</td>
            <td>:</td>
            <td><html:text property="kode"/></td>
        </tr>
        <tr>
            <td>Name</td>
            <td>:</td>
            <td><html:text property="nama"/></td>
        </tr>
        <tr>
            <td>Weight</td>
            <td>:</td>
            <td><html:text property="weight"/></td>
        </tr>
        <tr>
            <td>Type / Unit</td>
            <td>:</td>
            <td>                
                <html:select property="idHargaHpp">
                    <c:forEach items="${prices}" var="price">
                        <html:option value="${price.id}">${price.jenis.nama} / ${price.unit.nama}</html:option>                        
                    </c:forEach>
                </html:select>
            </td>
        </tr>
        <tr>
            <td>StockLI</td>
            <td>:</td>
            <td><html:text property="stockLI"/></td>
        </tr>
        <tr>
            <td>StockLE</td>
            <td>:</td>
            <td><html:text property="stockLE"/></td>
        </tr>
        <tr>
            <td colspan="3"><html:submit value="Save Now and Leave" property="submit"/> Or <html:submit value="Save Now and Stay" property="submit"/></td>
        </tr>
    </table>
</html:form>